<div class="container-fluid p-t-15">
  <div class="row">
    <div class="col-lg-12">
    	<ul id="myTabs" class="nav nav-tabs" role="tablist">
           <li class="active"><a href="#base" id="base-tab" role="tab" data-toggle="tab">基础设置</a></li>
         </ul>
        <form action="#!" method="post" name="edit-form" class="form form-horizontal tab-content">
        	<div id='base' class="card tab-pane fade active in">
		        <div class="card-header bg-primary">
		          <h4>基础设置</h4>
		        </div>
		        <div class="card-body">
			         <div class="form-group">
			           	<label>周费设置</label>
			           	<div class='input-group'>
    			           	 <div class='input-group-addon'>天数</div>
    			             <input type="number" name="base[freeday]" class="form-control" value="{{$set ? $set['base']['freeday'] : ''}}" />
    			             <div class='input-group-addon'>周费</div>
    			             <input type="text" name="base[weekprice]" class="form-control" value="{{$set ? $set['base']['weekprice'] : ''}}" />
    			           	 <div class='input-group-addon'>产品ID</div>
    			             <input type="text" name="base[pricepid]" class="form-control" value="{{$set ? $set['base']['pricepid'] : ''}}" />
			            </div>
			         </div>
		        </div>
		    </div>
        </form>
    </div>
  </div>
	<button type="button" onclick="onSubmit()" class="btn btn-primary">确 定</button>
</div>
<script>
function onSubmit(){
	lightyear.loading('show');
	$.ajax({
		url:'',
		type:'post',
		data:$('form').serialize(),
		success:function(res){
			lightyear.loading('hide');
			if(res == 1){
				lightyear.notify('保存成功', 'success', 1500);
				setTimeout(function(){
					location.reload();
				},1500);
			}else lightyear.notify(res, 'danger', 100);
		}
	});
}
</script>